Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
↳ QTRS
↳ DirectTerminationProof
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
We use [23] with the following order to prove termination.
Recursive path order with status [2].
Quasi-Precedence:
[fib1, 0] > sel2 > activate1 > fib12 > cons2 > [s1, nfib12]
[fib1, 0] > sel2 > activate1 > fib12 > add2 > [s1, nfib12]
Status: sel2: [1,2]
add2: [2,1]
fib1: multiset
s1: multiset
0: multiset
cons2: multiset
fib12: [2,1]
nfib12: multiset
activate1: multiset